<?php
namespace Popshouse\SiteBundle\Entity;

use Popshouse\SiteBundle\Entity\Image;


/**
 * @orm:Entity
 */
class Pageimg extends Image{
	
	public function __construct() {
        $this->onPages = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    
	protected function getImageDir(){
		return "database";
	}
	
	/**
     * @orm:OneToMany(targetEntity="Pageimage", mappedBy="image", cascade={"all"})
     */
	protected $onPages;
	
	public function addOnPage($page){
		$this->onPages->add($page);
	}
	
}